//
//  KCPatrolRepHeadCell.swift
//  MyKC
//
//  Created by yy on 2017/3/30.
//  Copyright © 2017年 com.yasuo. All rights reserved.
//

import UIKit

class KCPatrolRepHeadCell: UITableViewCell {
    lazy var indexPath:IndexPath = IndexPath()

    @IBOutlet weak var lbe_questionIndex: UILabel!
    //单选多选等---
    @IBOutlet weak var lbe_questionType: UILabel!
    
    @IBOutlet weak var imv_isNessary: UILabel!
    
    @IBOutlet weak var lbe_content: UILabel!
    var questionModel: KCQuestionModel? {
        //外界已经完成了的赋值
        didSet {
            if questionModel?.QuestionType! == "800001" {
                lbe_questionType.text = "单选"
            }
            else if questionModel?.QuestionType! == "800002" {
                lbe_questionType.text = "多选"
            }
            else {
                lbe_questionType.text = ""
            }
            imv_isNessary.isHidden = !(questionModel?.Necessary == "1")
            lbe_content.text = questionModel?.content
            lbe_questionIndex.text = "问题" + "\(indexPath.section + 1)"
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
